from django.contrib import admin
from .models import Case,Dorm,Person

@admin.register(Case)
class CaseAdmin(admin.ModelAdmin):
    list_display = ('name','rank')
    ordering = ('rank',)

@admin.register(Dorm)
class DormAdmin(admin.ModelAdmin):
    list_display = ('name',)

@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
    list_display = ('id', 'name','case','birthday','dorm')
    search_fields = ('name',)
    ordering = ('case','dorm')

